<div ng-controller="CouponCtrl" ng-init="listAction()">
    <ul class="sui-breadcrumb">
        <li>{{'卡券'| translate}}</li>
        <li>{{'List'|translate}}
            <!-- <a href="#/coupon/add" id="addNew" class="sui-btn btn-primary">+{{'add_new' | translate}}</a> -->
        </li>
        <span class="sui-form sui-form pull-right">
            <wx-app-list ng-model="wxappid" dft="1" ary="storeary" xc="1"> </wx-app-list>
            <button class="sui-btn btn-primary" ng-click="downloadCoupon()">{{'下载'|translate}}</button>
        </span>
    </ul>
    <table class="sui-table table-bordered">
        <tr>
            <th>{{'卡券类型'|translate}}</th>
            <th>{{'卡券标题'|translate}}</th>
            <th>{{'有效期'|translate}}</th>
            <th>{{'状态'|translate}}</th>
            <th>{{'已领数量'|translate}}</th>
        </tr>
        <tr ng-repeat="list in card_list">
            <td>{{list.card_type_name}}</td>
            <td>{{list.title}}</td>
            <td>
                <span ng-show="list.fixed_term">
                    领取后{{list.fixed_begin_term != 0?list.fixed_begin_term:"当"}}天生效，{{list.fixed_term}}天有效    
                </span>
                <span ng-show="list.begin_timestamp">
                    {{list.begin_timestamp}} 至 {{list.end_timestamp}}                
                </span>
            </td>
            <td>
                {{list.status_name}}
            </td>
            <td>
                <a href="#/coupon/log?card_id={{list.card_id}}&wxappid={{wxappid}}">{{list.total_quantity - list.quantity}}</a>
            </td>
        </tr>
    </table>
    <pager page-no="1" page-size="pageSize" total="total_count" get-data="getList(pageNo)"></pager>
</div>